/********************************************************************************
Name:  PreferredAccountWebAddress
Copyright © 2012  HFH International
======================================================
======================================================
Purpose:
-------
To make only one active Account web Address as preferred. 
======================================================
======================================================
History 
-------
VERSION  AUTHOR                DATE        DETAIL              
  1.0  - CG DEV TEAM    7/25/2012   INITIAL DEVELOPMENT  
*********************************************************************************/ 
    
trigger PreferredAccountWebAddress on Web_Address__c (before insert, before update) {
    
AccountWebAddressTriggerHandler triggerhandler=new AccountWebAddressTriggerHandler();
    
/*if((trigger.isInsert && trigger.isBefore)|| (trigger.isUpdate && trigger.isBefore)){
    handler.OnAccountWebAddress(trigger.new);
  }*/
  if(trigger.isInsert && trigger.isbefore){
       
        triggerhandler.AccountWebAddressInsert(trigger.new);
      }
    if((trigger.isUpdate && trigger.isBefore)){
       
        triggerhandler.AccountWebAddressUpdate(trigger.new, trigger.old);
      }  
      
      if(trigger.isbefore && trigger.Isdelete){
         
          triggerhandler.ContactWebAddressDelete(trigger.old);
      }
}